Go to other chapters or to other branches of math
Additional Material for this Chapter
Exercises for this Chapter
Answers to Exercises

Chapter 3
The Algebra of Matrices

In this chapter the operations of addition, subtraction and multiplication of matrices will be discussed. Any two integers may be added, subtracted or multiplied. However, not any two matrices may be added or subtracted, nor any two matrices may be multiplied. Their sizes must be conformal in some sense.

Section 1:   The addition of matrices

[1.1a] (Conformality) Two matrices are conformal for addition if they have the same size, that is, they have the same number of rows and they have the same number of columns.

[1.1b] (Addition) The sum of two matrices, conformal for addition, is obtained by the addition of corresponding entries.
Notation: if αij and βij are the entries in the [i,j] locations of two mxn matrices, then the sum αij + βij is the entry in the [i,j] location in the mxn sum of the two matrices.

Example:

		1  2  3  4		6  4  2  0		1+6  2+4  3+2  4+0		   7  6  5  4
(matrix)	5  6  7  8      +	9  8  4  3   =	5+9  6+8  7+4  8+3	   =     14 14 11 11		
		9  0  7  3		2  7  8  9		9+2  0+7  7+8  3+9		   11 7 15 12

Another way of looking at addition of matrices is the addition of corresponding row arrays (or the addition of corresponding column arrays). (1,2,3,4) + (6,4,2,0) = (7,6,5,4) is the addition of the row1 arrays. Similar additions exist for the row2 and row3 arrays.

[1.2] (Additive inverse) The additive inverse of a matrix is obtained by negating every entry in the matrix.
Notation: If A is a matrix, then every entry in --A is the negative of the corresponding entry in A.

It is obvious that the sum of a matrix and its additive inverse is the zero matrix. The additive inverse is also called the negative of a matrix.

[1.3] (Subtraction) To subtract one matrix from another (of the same size) add the negative (of all the entries) of the matrix being subtracted.
Notation: A -- B = A + (--B).

			7  8  9	4  1  2		3  7  7
	(matrix)	6  9  5   --	1  2  4 	    =	5  7  1
			5  6  8      3  1  2		2  5  6

The collection of all arrays of the same size form a commutative additive group.

[1.4] (Additive group) The collection of all matrices of the same size is a commutative additive group.
Notation: If A,B,C are matrices of the same size, then
   A + B is a matrix of that same size;      (closure)
   (A + B) + C = A + (B + C);      (associative)
   A + B = B + A;      (commutative)
   the zero matrix is the additive identity
   every matrix has an additive inverse.

It is possible to multiply an array by a real number. Then each entry in the array is multiplied by that number. It is easy to extend this multiplication to matrices.

[1.5] (Multiplication by a real number) The product of a real number and a matrix is obtained by multiplying every entry in the matrix by that same number.
Notation: if   αij   is the [i,j] entry in matrix A then   λαij   is the [i,j] entry in matrix λA.

Example: λ = 10

					1  2  3  4		10 20 30 40
		10 * (matrix)		5  6  7  8	=	50 60 70 80
					9  0  1  2		90  0 10 20
It is not surprising that the same answer can be obtained by adding the matrix to itself so that the matrix appears 10 times.\ with 9 addition signs.

To divide a matrix by a non-zero real number, divide each entry by that number. This is equivalent to multiplying the matrix by the reciprocal of that number.

Click here to see a discussion of linear matrix equations and their solutions.



Section 2:   The multiplication of matrices

In general multiplication of numbers is more involved than addition of numbers. Therefore, it should be expected that multiplication of matrices is more involved that the addition of matrices. The following definition for multiplication is "too simple":   Each entry in the product of two matrices is equal to the product of the corresponding entries in the two matrices. The following matrices A,B and their "product" AB shows an undesirable aspect of this multiplication.
		A =			B = 				AB = 			AB =
		1  0  2		0  6  0			1x0  0x6  2x0 	0  0  0
		0  3  0		7  0  8			0x7  3x0  0x8		0  0  0
In this situation the "product" of two non-zero matrices produced a zero matrix. There are more difficulties with this type of multiplication that prevent the formation of useful collections of matrices with the properties of groups.

For motivation of the following definitions, click here.

[2.1a] (Compatibility) A first matrix and a second matrix are conformal for multiplication if and only if the common length of any row of the first matrix is equal to the common length of any column of the second matrix.
Notation: Let h be length of any row in the first matrix. Then h is also the length of any column in the second matrix. An mxh matrix and an hxn matrix are conformal for multiplication for any natural numbers m,n and h.

But a 3x4 matrix and a 6x7 matrix are not conformal for multiplication, because 4 and 6 are not equal.

[2.1b] (Multiplication) Suppose the first and second matrices are conformal for multiplication. Their product is made up of the following entries: the [i,j] entry is equal to the inner product of rowi of the first matrix and columnj of the second matrix.
Notation: if A is an mxh matrix and B is an hxn matrix then their product AB is an mxn matrix. The [i,j] entry of AB is equal to the inner product rowAi and columnBj.

Example:

				A =			B =
				8  0  4		1  4  2  7
	(matrices)		7  9  6		2  5  1  4
							3  6  5  8
Here the lengths of rows (8,0,4) and (7,9,6) are 3, and the lengths of columns (1,2,3)t, (4,5,6)t, (2,1,5)t, (7,4,8)t are 3. Therefore, A and B are conformal for multiplication. The entries in the matrix product AB are the following inner products:
			AB = 
	(matrix)	(8,0,4)*(1,2,3)t   (8,0,4)*(4,5,6)t   (8,0,4)*(2,1,5)t   (8,0,4)*(7,4,8)t   
			(7,9,6)*(1,2,3)t   (7,9,6)*(4,5,6)t   (7,9,6)*(2,1,5)t   (7,9,6)*(7,4,8)t
Then
			AB = 
	(matrix)	20   56   36   88
			43  109   53  133 

The following is obvious, expected and in a sense trivial. If any matrix and a zero matrix are conformal for multiplication then their product is a zero matrix. Also if a zero matrix and any matrix are conformal for multiplication then their product is a zero matrix.
Notation: AO = O.   OA = O.

Multiplication of two matrices can be tedius, and can be done more easily by a computer. There, the most work is to input accurately the entries of the matrices. Click here and search for the executable form of the program "matmult2." (If there are three matrices for multiplication then search for the executable form of the program "matmult3.") The reader can use the program to verify the following products AB and BA:

		A =			B =				AB =			BA =
		 1 -1  1		1  2  3			0  0  0		-11   6   -1
  (matrices)	-3  2 -1		2  4  6			0  0  0		-22  12   -2
		-2  1  0		1  2  3			0  0  0		-11   6   -1
This example demonstrates three facts. (1) Two square matrices of the same size may be multiplied in either order. (2) Matrix multiplication is not commutative: AB is not equal to BA. (3) It is possible that the product of two non-zero matrices may be the zero matrix.

Three times what number equals six. This is a simple equation in algebra: 3x = 6. Here is a similar question with 2x2 matrices:

			6   2	   times what matrix equals	42   10
			2   1						16    4
This can be written as: AX = B where A = the matrix on the left, B = the matrix on the right, and X is the unknown matrix that satisfies the equation. Obviously, X must be 2x2, but its entries are unknown. Let them be denoted by x1, x2, x3, x4:
	(matrix)    X = 	x1	x2
				x3	x4
The matrix equation AX = B becomes:
	(matrices)		6   2   times   x1	x2	=		  42   10
				2   1		   x3 	x4			  16    4
Multiplying out the matrices on the left side of the equality produces the equality of two 2x2 matrices:
	(matrices)				  6x1 + 2x3    6x2 + 2x4	=	42   10
						  2x1 + x3     2x2 + x4		16    4

For this equality of matrices to be true, all of the corresponding entries must be equal. This fact produces 4 equations:

6x1 + 2x3 = 42
2x1 + x3 = 16
6x2 + 2x4 = 10
2x2 + x4 = 4
Solving the first two equations produces:   x1 = 5   and   x3 = 6. Solving the last two equations produces:   x2 = 1   and   x4 =2. Therefore, the final solution is:
	(matrix)	X   =	5    1
				6    2
For lack of a better name, this method of finding the unknown matrix X will be called the method of finding the unknown matrix by equations." There will be another method by determinants, discussed in the next cchapter.

Not discussed here are solutions to equations AX = B in which A and B are matrices that are not square.
Not all matrix equations AX = B involving square matrices can be solved.

The following important theorem will be given without proof.
[2.2] (Associativity) Multiplication of (conformal) matrices is associative.
Notation: A(BC) = (AB)C. Of the two multiplications involved either one can be done before the other.

If v = (α1, α2,..., αn) is an array of length n, then it is possible to "isolate" the different coordinates of v using inner product.   v*(1,0,0,...0) will "isolate" the first coordinate α1.   v*(0,1,0,...0) will "isolate" the second coordinate α2. In general, v*(0,0,...,0,1,0,...,0) will isolate the j-th coordinate of v, where the 1 in the array (0,0,...,0,1,0,...,0) is the j-th coordinate, and all the other coordinates are 0. Let the unit vectorej = (0,0,...,1,0,...,0) where 1 is the j-th coordinate. Form a matrix In using e1, e2, ..., ej, ..., en as column arrays. Then In is the identity matrix described in [1. ]. If A is any mxn matrix then the product AIn = A. A similar discussion can be developed using unit vectors d1, d2, ..., di, ..., dm of lengths m. The identity matrix Im can be formed using them as row arrays. Then ImA = A. Therefore, Im and In are identity matrices of sizes mxm and nxn for multiplication. Identity matrices are always square. Often the subscript on I is omitted, because it is almost always obvious what it should be.

[2.3] (Identity) If any matrix and the identity matrix are conformable, then their product is equal to the first matrix. If the identity and any matrix are conformable, then their product is equal to the second matrix.
Notation: AI = A.   IB = B.

Square matrices have special importance. (1) There is only one nxn identity matrix I:   IA = AI = A.   (2) It is possible that a product may be I. For example, the reader can verify that

 				1  3  3		7  -3  -3			1  0  0
	the product of 	1  4  3	and	-1  1  0		is	0  1  0
				1  3  4		-1  0  1			0  0  1

In general the product of any two square matrices is not commutative. The following indicates an exception. It also shows that the identity matrix is rather distinguished.

[2.4a] (Commutative product) If the product of two square matrices is equal to the identity matrix then the reverse product is also equal to the identity matrix.
Notation: if AB = I then BA = I   (where A and B are square matrices).

The reader can verify that the product of the two matrices just above taken in the reverse order still produces the identity matrix. A proof of [2.4a] by the method of equations is extremely tedius. A better method will be used later to prove it.

[2.4b] (Inverse) If the product of two square matrices is the identity matrix then each matrix is the (multiplicative) inverse of the other.
Notation: if AB = I then B is a multiplicative inverse of A.
Notation: A-1 denotes the multiplicative inverse of A (if the inverse exists).

By [2.4b] AA-1 = I. Then, by [2.4a] A-1A = I. Inverses are "two-sided." The notation 1/A for the inverse of A provides ambiguity. The "fraction" B/A could mean BA-1 or could mean A-1B, which may be different. There is at most one inverse for a square matrix.

Now suppose the inverse of a square matrix A exists but is unknown.. Let X be that unknown. Then AX = I. Solving this equation for X as described above (method of finding the unknown matrix by equations) will find the inverse X = A-1.

[2.4c] (Non-singularity) If an inverse exists for a square matrix, then that matrix is said to be non-singular. If it has no inverse, then the matrix is said to be singular.
Notation:   A is non-singular if and only if A-1 exists.

Later a test, using determinants, for singularity or non-singularity will be given. Then it will not be necesary to try to go through the process of trying to find an inverse to determine the condition.

A (square) zero matrix O is singular. The proof is indirect. Suppose O is non-singular. Then the equation OX = I can be solved for X. But OX = O. Therefore, OX eequals both O and I. This means that O = I, which is a contradiction. So O must be singular.
Then the inverse O-1 exists. By definition [2.4b] OO-1 = I. But the product of the zero matrix and any matrix conformable for multiplication is the zero matrix: OO-1 = O. This means that I = O, which is a contradiction.

There are non-zero square matrices that are singular. In a previous example above, AB = O where A and B are not equal to O. An indirect argument shows that neither A nor B can be non-singular. (Assume non-singularity and show that A and B must be O (multiplying their inverses with the equation), contrary to the assumption that neither equals O.)